// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router/index'
import jq from 'jquery';
import toast from './components/toast';
import loading from './components/loading';
import tools from './assets/tools'
import md5 from 'md5';
// import VueTouch from 'vue-touch'
import './assets/scss/base.css';
Vue.component('toast', toast);
Vue.component('loading', loading);

//methods.js导入自定义方法(/变量)用于全局方法
import methods from './js/methods.js';
//方法挂靠全局
Object.keys(methods).forEach((key) => {
    Vue.prototype[key] = methods[key];
})
// Vue.use(VueTouch, { name: 'v-touch' })
Vue.config.productionTip = false

window.$ = jq;
window.tools = tools;
window.tools.vue = Vue;
window.tools.router = router

/* eslint-disable no-new */
new Vue({
    el: '#app',
    render: h => h(App),
    router,
    template: '<App/>',
    components: { App }
})